package org.gtiles.components.login.authentication;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

public class CustomUserDatails extends User
{

	private static final long serialVersionUID = 7396402600368515367L;
	private Object extendAccountInfo;
	private String client;
	public String getClient() {
		return client;
	}

	public void setClient(String client) {
		this.client = client;
	}

	public CustomUserDatails(String username, String password,
			Collection<? extends GrantedAuthority> authorities) {
		super(username, password, authorities);
	}

	public CustomUserDatails(String username, String password, boolean enabled,
			boolean accountNonExpired, boolean credentialsNonExpired,
			boolean accountNonLocked,
			Collection<? extends GrantedAuthority> authorities) {
		super(username, password, enabled, accountNonExpired, credentialsNonExpired,
				accountNonLocked, authorities);
	}
	/**
	 * 获取扩展账号信息
	 * @return 扩展账号对象
	 */
	public Object getExtendAccountInfo() {
		return this.extendAccountInfo;
	}
	/**
	 * 设计扩展账号信息对象
	 * @param extendAccountInfo 扩展账号对象
	 */
	public void setExtendAccountInfo(Object extendAccountInfo) {
		this.extendAccountInfo= extendAccountInfo;
	}
}
